<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%-- 静态包含 --%>
<%@ include file="/common/include/page.jsp" %>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<title>管理员列表 - sm</title>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport"
			content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
		<link rel="stylesheet" type="text/css"
			href="${rootPath}/bootstrap/css/bootstrap.min.css" />
		<link href="${rootPath}/css/main.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="${rootPath}/js/jquery-3.0.0.min.js"></script>
		<script type="text/javascript" src="${rootPath}/bootstrap/js/bootstrap.min.js"></script>
	</head>
	<body>
		<!-- 网页头部开始 -->
		<nav class="navbar navbar-default navbar-fixed-top">
			<div class="container-fluid">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#navbar" aria-expanded="false"
						aria-controls="navbar">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#">LOGO</a>
				</div>
				<div id="navbar" class="navbar-collapse collapse">
					<ul class="nav navbar-nav navbar-right">
						<li><a href="#">首页</a></li>
						<li><a href="main.html">个人中心</a></li>
						<li class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown" role="button" aria-haspopup="true"
							aria-expanded="true"> 配置 <span class="caret"></span>
						</a>
							<ul class="dropdown-menu">
								<li><a href="info.html">个人信息</a></li>
								<li><a href="insert.html">修改信息</a></li>
								<li role="separator" class="divider"></li>
								<li><a href="list.html">用户列表</a></li>
							</ul></li>
						<li><a href="login.html" onclick="return confirm('确认退出吗?')">退出</a></li>
					</ul>
					<form class="navbar-form navbar-right visible-sm">
						<input type="text" class="form-control" placeholder="Search...">
					</form>
				</div>
			</div>
		</nav>
		<!-- 网页头部结束 -->
		<div class="container-fluid">
			<div class="row">
				<div class="col-sm-10 col-sm-offset-1 main">
					<h2 class="sub-header">用户列表</h2>
					<form action="" method="post" class="form-inline">
						<div class="form-group">
							<label for="keyword">关键字:</label> <input type="text"
								name="keyword" value="" class="form-control"> <label
								for="email">更新时间:</label> <input type="text" name="st" value=""
								readonly="true" class="form-control"
								onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
								class="Wdate" /> --> <input type="text" name="ed" value=""
								readonly="true" class="form-control"
								onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
								class="Wdate" /> <input type="submit" class="btn btn-primary"
								value="搜索">
						</div>
					</form>
					<div class="table-responsive">
						<table class="table table-striped">
							<thead>
								<tr>
									<th>序号</th>
									<th>Id</th>
									<th width="20%">角色</th>
									<th width="20%">邮箱</th>
									<th>状态</th>
									<th>创建时间</th>
									<th>更新时间</th>
								</tr>
							</thead>
							<tbody>
								<%--通过JSTL中的循环标签取出来
									items ==== l
									admins:admins
									varStatus = count
									
									int count = 0 ; 
									for(Iterator iter = l.iterator();i.hasNext();
									{
										AAdmins admins = i.next ;
										count ++ ; 
									}
									
									JSTL如何对时间进行格式化呢?
								 --%>
								<c:forEach items="${requestScope.adminsList}" var="admins" varStatus="stat">
									<tr>
										<td>${stat.count }</td>
										<td>${admins.id}</td>
										<td>${admins.email}</td>
										<td>${admins.role.name }</td>
										<td>${admins.statusStr}</td>
										<td><fmt:formatDate value="${admins.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
										<td><fmt:formatDate value="${admins.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
	
						<form id="usersListPageForm"
							action="${rootPath }/usersList.html" method="post">
	
							<!-- 设置一些参数 -->
							<input type="hidden" name="keyword" value=""> <input
								type="hidden" name="status" value=""> <input
								type="hidden" name="st" value=""> <input type="hidden"
								name="ed" value="">
							<nav>
								<ul class="pager">
									<li><a href="#"><span>首页</span></a></li>
									<li><a href="#"><span>上一页</span></a></li>
									<li><a href="#"><span>下一页</span></a></li>
									<li><a href="#"><span>尾页</span></a></li>
									<li>共${requestScope.pageInfoUtil.totalPage }页,共${requestScope.pageInfoUtil.totalRecord }条</li>
									<li>第<input type="text" id="currentPage" name="currentPage"
										value="${requestScope.pageInfoUtil.currentPage }" size="5" maxlength="5" />页
									</li>
									<li>
										每页<input type="text" id="pageSize" name="pageSize"
										value="${requestScope.pageInfoUtil.pageSize }" size="5" maxlength="5" />
										条</li>
									<li><input type="submit" value="GO" class="btn btn-primary" /></li>
								</ul>
							</nav>
						</form>
					</div>
				</div>
			</div>
		</div>
		<!-- 提示信息 -->
		<div class="container">
			<div class="col-sm-8 col-sm-offset-1"></div>
		</div>
	
		<footer class="footer ">
			<div class="container">
				<div class="row footer-top">
					<div class="col-sm-6 col-lg-6">
						<h4>
							<!-- <img src="http://static.bootcss.com/www/assets/img/logo.png"> -->
						</h4>
						<p>
							本网站所列开源项目的中文版文档全部由<a href="#">用户中心</a>顶力开发 <a href="#"
								target="_blank">CC BY 3.0</a>协议发布。
						</p>
					</div>
					<div class="col-sm-6  col-lg-5 col-lg-offset-1">
						<div class="row about">
							<div class="col-xs-3">
								<h4>关于</h4>
								<ul class="list-unstyled">
									<li><a href="#">关于我们</a></li>
									<li><a href="#">广告合作</a></li>
									<li><a href="#">友情链接</a></li>
									<li><a href="#">招聘</a></li>
								</ul>
							</div>
							<div class="col-xs-3">
								<h4>联系方式</h4>
								<ul class="list-unstyled">
									<li><a href="#" title="#" target="_blank">新浪微博</a></li>
									<li><a href="#">电子邮件</a></li>
								</ul>
							</div>
							<div class="col-xs-3">
								<h4>旗下网站</h4>
								<ul class="list-unstyled">
									<li><a href="#" target="_blank">Laravel中文网</a></li>
									<li><a href="#" target="_blank">Ghost中国</a></li>
								</ul>
							</div>
							<div class="col-xs-3">
								<h4>赞助商</h4>
								<ul class="list-unstyled">
									<li><a href="#" target="_blank">UCloud</a></li>
									<li><a href="#" target="_blank">又拍云</a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<hr>
				<div class="row footer-bottom">
					<ul class="list-inline text-center">
						<li><a href="#" target="_blank">京ICP备11008151号</a></li>
						<li>京公网安备11010802014853</li>
					</ul>
				</div>
			</div>
		</footer>
	</body>
</html>